home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_riv_candleburn.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  80 lines

  1. # Jones 3D Cog Script
  2. #
  3. # Riv_CandleBurn.cog
  4. #
  5. # light & blow out candles upon notice from Riv_Candelabra.cog
  6. #
  7. # [HB]
  8. #
  9. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  10. # ==============================================================================
  11.  
  12. symbols
  13.  
  14.     message        startup
  15.     message        user1
  16.     message        user2
  17.     message        user3
  18.  
  19.     thing        candleflame                                nolink
  20.     thing       smoke                                    local
  21.  
  22.     cog            candelabracog
  23.     
  24.     template    tpl_Smoke=dustcloud                        local
  25.  
  26.     material    mat_Smoke=gen_a4sfx_dustcloud.mat        local
  27.     
  28.     sound       sfx_Light=riv_candle_light_c.wav        local
  29.  
  30.     int            sleepytime                                local
  31.  
  32. end
  33.  
  34. # ==============================================================================
  35.  
  36. code
  37.  
  38. # ..............................................................................
  39.  
  40. startup:
  41.  
  42.     SetThingFlags(candleflame, 0x80000);
  43.  
  44.     return;
  45.  
  46. # ..............................................................................
  47.  
  48. user1:
  49.  
  50.     # light candle
  51.     ClearThingFlags(candleflame, 0x80000);
  52.     PlaySoundLocal(sfx_Light, 1.0, 0.0, 0x0, 0);
  53.     
  54.     # animate smoke
  55.     smoke = CreateThing(tpl_Smoke, candleflame);
  56.     CaptureThing(smoke);
  57.     SetMaterialCel(mat_Smoke, 0);
  58.     MaterialAnim(mat_Smoke, 4.0, 1);
  59.     AnimateSpriteSize(smoke, '0.05 0.05 0.08', '0.2 0.2 0.0', 2.0);
  60.  
  61.     return;
  62.  
  63. # ..............................................................................
  64.  
  65. user2:
  66.  
  67.     # wait
  68.     Sleep(RandBetween(5, 10));
  69.     
  70. user3:
  71.  
  72.     # blow out candle    
  73.     SetThingFlags(candleflame, 0x80000);
  74.     SendMessage(candelabracog, user0);
  75.  
  76.     return;
  77.  
  78. # ..............................................................................
  79.  
  80. end